#ifndef H_CONTROL
#define H_CONTROL


#include "includes.h"
#include "actor.h"
#include "navButton.h"

#define MOVECURSORSTATE 0
#define MOVECAMERASTATE 1
#define AUTOCAMERASTATE 2

#define FLYINGCAMERA 0
#define WALKINGCAMERA 1

class Input;
class Node;

class Control: public Actor {

public:
   static bool bRunning;
   static vector <Node *> nodeList;              //all Nodes
   static vector<Node *> nodeTree;               //currently active nodes

   Actor *controlledActor;
   NavButton *navBtn;                            //we use that one for rotation

   Vector3f lookPoint;
   Vector3f upPoint;

   int state;
   int moveMode;

   Control();

   void processMove(double deltaTime);
   void update(double deltaTime);
   void confineMouse();

   void switchMode();
   void toggleFlyMode();
   void start();
   void stop();
   void updateNodes();
   /*
   void interpolateTo(Vector3f targetLoc, Vector3f targetView);
   void interpolateToSpring(Vector3f targetLoc, Vector3f targetView);
   void interpolateToEnd(Vector3f targetLoc, Vector3f targetView);
   void circleAround();
   */

   void moveAutoCamera(float deltaTime);

};
#endif
